import QtQuick 1.0
import com.nokia.meego 1.0

PageStackWindow {
    id: mainWindow

    initialPage: mainPage

    MainPage {
        id: mainPage
    }

    AddAccountPage {
        id: addAccountPage
    }

    ToolBarLayout {
        id: commonTools
        visible: true
        //ToolIcon {
            //platformIconId: "toolbar-view-menu"
            //anchors.right: (parent === undefined) ? undefined : parent.right
            //onClicked: (myMenu.status === DialogStatus.Closed) ? myMenu.open() : myMenu.close()
        //}

        ToolButton {
            text: "Add account"
            onClicked: {
                pageStack.push(addAccountPage)
            }
        }
    }


    Menu {
        id: myMenu
        visualParent: pageStack
        MenuLayout {
            MenuItem {
                text: qsTr("Add account")
                onClicked: pageStack.push(addAccountPage)
            }
        }
    }
}

